// 这是所有页面的配置文件

import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
//element-plus按需引入配置文件；
import AutoImport from 'unplugin-auto-import/vite';
import Components from 'unplugin-vue-components/vite';
import { ElementPlusResolver } from 'unplugin-vue-components/resolvers';
// import path from 'path';
// https://vitejs.dev/config/
export default defineConfig( {
  plugins: [
    vue(),
    //element-plus通过插件按需引入；
    AutoImport( {
      resolvers: [ ElementPlusResolver() ],
    } ),
    Components( {
      resolvers: [ ElementPlusResolver() ],
    } ),
  ],

  resolve: {
/*     alias: {
      '@': path.resolve(__dirname, 'src/') // 将 '@' 解析为 'src/' 目录
    }, */
    "compilerOptions": {
    "moduleResolution": "node",
    "baseUrl": ".",
    "paths": {
      "@/*": ["src/*"]
    }
  }
  },

} );
